import Vue from "vue";
import VueRouter from "vue-router"; //导入路由

import Login from "../pages/Login.vue";
import Index from "../pages/Index.vue";

// 资料管理
import pest from "../pages/datas/pest.vue";
import worm from "../pages/datas/worm.vue";
import mouse from "../pages/datas/mouse.vue"

//灾情防治
import area from "../pages/disaster/area.vue"
import classs from "../pages/disaster/classs.vue"
import event from "../pages/disaster/event.vue"

//专家会商
import expert from "../pages/expert/expert.vue"
import consult from "../pages/expert/consult.vue"

//药剂器械管理
import medicine from "../pages/medicine/medicine.vue"
import out from "../pages/medicine/out.vue"

//系统管理
import user from "../pages/user/user.vue";
import log from "../pages/user/log.vue";

Vue.use(VueRouter);

const routes = [
  { path: "/login", component: Login },
  {
    path: "/index",
    component: Index,
    children: [
         // 资料管理
        { path: "/index/pest", component: pest },
        { path: "/index/worm", component: worm },
        {path:"/index/mouse",component:mouse},
        //灾情防治
        {path:"/index/area",component:area},
        {path:"/index/classs",component:classs},
        {path:"/index/event",component:event},
        //专家会商
        {path:"/index/expert",component:expert},
        {path:"/index/consult",component:consult},
        //药剂器械管理
        {path:"/index/medicine",component:medicine},
        {path:"/index/out",component:out},
        //系统管理
        {path:"/index/user",component:user},
        {path:"/index/log",component:log},

    ],
  },
];

export default new VueRouter({
  mode: "history",
  routes: routes,
});
